package com.atxiaodei.springbootmybatisplus.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @ClassName CustomPageSql
 * @Deacription TODO
 * @Author wangmeng
 * @Date 2021/3/19 16:30
 * @Version 1.0
 **/
public interface CustomPageSql {


    @Select("select us.id,us.name,us.age,ui.id,ui.telnumber,ui.hobby,ui.desc from user us LEFT JOIN userinfo ui on us.id=ui.id ${ew.customSqlSegment}")
    IPage<Map<String, Object>> getCusPageSql(@Param("pg")Page page, @Param(Constants.WRAPPER) Wrapper wrapper);
}
